home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
551-575
/
disk_559
/
apig
/
apiglib_v11.lzh
/
e13_fonts.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-09-28
|
3KB
|
113 lines
/* example use of fonts */
x = addlib("apig.library",0,-30,0)
portname = "example13_port"
p = openport(portname)
call set_apig_globals() /* Create Intuition Global Constants */
scr = 0
scrtitle = "Hey Buddy, Yea You, This is Your New Screen !"
wintitle = "This is your title"
winidcmp = CLOSEWINDOW+GADGETDOWN+GADGETUP
winflags = WINDOWCLOSE+WINDOWDRAG+WINDOWSIZING+WINDOWDEPTH+GIMMEZEROZERO
scr = openscreen(0,0,640,400,3,4,5,LACE+HIRES,CUSTOMSCREEN,scrtitle)
/* open window */
w1 = openwindow(portname,0,0,640,400,2,4,winidcmp,winflags,wintitle,scr,0,0,0)
rpw1 = getwindowrastport(w1)
call setrgb4(w1,0,2,2,2)
call setrgb4(w1,1,3,3,3)
call setrgb4(w1,2,2,7,7)
call setrgb4(w1,3,0,0,0)
call setrgb4(w1,4,11,11,11)
call setrgb4(w1,5,4,4,5)
call setrgb4(w1,6,6,9,13)
call setrgb4(w1,7,15,15,15)
fcourier11 = maketattr(w1,"courier.font",11)
fcourier13 = maketattr(w1,"courier.font",13)
fcourier15 = maketattr(w1,"courier.font",15)
fcourier18 = maketattr(w1,"courier.font",18)
fcourier24 = maketattr(w1,"courier.font",24)
fsapphire14 = maketattr(w1,"sapphire.font",14)
fsapphire19 = maketattr(w1,"sapphire.font",19)
fruby8 = maketattr(w1,"ruby.font",8)
fruby12 = maketattr(w1,"ruby.font",12)
fruby15 = maketattr(w1,"ruby.font",15)
courier11 = openfont(fcourier11)
courier13 = openfont(fcourier13)
courier15 = openfont(fcourier15)
courier18 = openfont(fcourier18)
courier24 = openfont(fcourier24)
sapphire14 = openfont(fsapphire14)
sapphire19 = openfont(fsapphire19)
ruby8 = openfont(fruby8)
ruby12 = openfont(fruby12)
ruby15 = openfont(fruby15)
i2x = makeitext(w1,"YES",6,3,2,3,JAM2,fcourier18,0)
i3x = makeitext(w1,"NO",6,3,2,3,JAM2,fcourier24,0)
i1x = makeitext(w1,"this is a test",6,3,2,7,JAM2,fcourier15,0)
x = printitext(rpw1,i1x,420,30)
x = printitext(rpw1,i2x,420,50)
x = printitext(rpw1,i3x,420,70)
x = pitext(rpw1,40,20,"Courier 11 Font",6,1,JAM2,fcourier11)
x = pitext(rpw1,40,40,"Courier 13 Font",6,2,JAM2,fcourier13)
x = pitext(rpw1,40,60,"Courier 15 Font",6,3,JAM2,fcourier15)
x = pitext(rpw1,40,80,"Courier 18 Font",6,4,JAM2,fcourier18)
x = pitext(rpw1,40,100,"Courier 24 Font",6,5,JAM2,fcourier24)
x = pitext(rpw1,350,110," THIS IS A TEST ",7,2,JAM2,fcourier24)
x = pitext(rpw1,350,134," Courier 24 Font ",7,2,JAM2,fcourier24)
x = pitext(rpw1,40,130,"Sapphire 14 Font",4,1,JAM2,fsapphire14)
x = pitext(rpw1,40,150,"Sapphire 19 Font",1,2,JAM2,fsapphire19)
x = pitext(rpw1,40,180,"Ruby 8 Font",1,3,JAM2,fruby8)
x = pitext(rpw1,40,200,"Ruby 12 Font",1,4,JAM2,fruby12)
x = pitext(rpw1,40,220,"Ruby 15 Font",1,5,JAM2,fruby15)
exitme = 0
do forever
x = waitpkt(portname)
do forever
msg = '0000 0000'x
msg = getpkt(portname)
if msg = '0000 0000'x then leave
class = getarg(msg,0)
if class = 512 then exitme = 1
x = reply(msg,0)
end
if exitme = 1 then leave
end
a = closefont(courier11)
a = closefont(courier13)
a = closefont(courier15)
a = closefont(courier18)
a = closefont(courier24)
a = closefont(sapphire14)
a = closefont(sapphire19)
a = closefont(ruby8)
a = closefont(ruby12)
a = closefont(ruby15)
say "CloseFont returned " a
a =closewindow(w1)
a =closescreen(scr)
exit